<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/mb/jsp/common.jsp" %>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>活动公告</title>
</head>
<body ontouchstart="">
<div class="detailTop pf w100 of">
    <div class="w100 of tc cf f18">
        <span class="pa" style="left: 2px;" onclick="javascript:history.back();"><img src="mb/images/top_back_white.png"
                                                                                      style="margin-top: 4px;height: 40px;width: 40px;"/></span>
       	 活动公告
    </div>
</div>

<div class="container db jz" style="padding-bottom: 0;padding-top: 46px;">

    <div id="container">

        <div id="resText"></div><!--resText-->
        <div id="loading" class="w100">
            <img src="mb/images/loading.gif" alt="正在加载" class="db jz hauto" style="width: 15px;">
            <div class="w100 tc f10 c9">正在加载</div>
        </div>
        
        
	</div>
	
	
	  	<!--footer-->
<footer id="footer" class="footerTab w100 of pf">
 
</footer>

<script>

		$(window).on("load", function() {
				headertabcurrent=4;
				$("#footer").load("mb/footer.jsp"); 
	    })


    //加载新数据
    function getData() {
        $.ajax({
            url: "LoginServlet",
            data: JSON.stringify({m: 101}),
            type: 'post',
            dataType: 'json',
            contentType: "application/json;charset=utf-8",
            beforeSend: function () {
                showProgressDg();
            },
            success: function (data) {
               if (data.state == 1) {
                  showData(data.list);
                } else {
                    // 其他错误弹出提示
                    showToast(data.info);
                }
            },
            error: function (data) {
                showToast(data.info);
            },
            complete: function () {
                closeProgressDg();
            }
        });
    }
    
    
      function showData(list)
    {
    	var htmlStr="";
    	$.each(list, function(index, obj) 
    	{
    		htmlStr +=
	    		   	'<section class="proSection pr w100 mgt10">'+
	    		   	  '<div class="w100 tc f13 c9">'+dataToString(obj.createtime,"YYYY-MM-dd HH:mm:ss")+'</div>'+
					   '<a href="mb/jsp/activitiesDetail.jsp?studyid=' + obj.studyid + '" class="w92 clearfix of jz db bcf mgt10 flexBox"  style="padding:8px 2%;align-items: center;">'+
				            '<div class="circle of" style="width:40px;height:40px;">'+
			                  '<img src="mb/images/img156.png" class="w100 h100">'+
			                '</div>'+
			               '<p class="c3 f15" style="width:77%;margin-left:3%;">'+obj.studytitle+'</p>'+
			                '<img src="mb/images/img10.png" alt="" class="db wauto rotate-90" style="height:12px;align-self:end;">'+
				        '</a>'+
					'</section>'; 
    		
    	});
    	
    	 $("#container").html(htmlStr);
    } 
    
    
    $(document).ready(function(){
	
		getData();
	  
	});
</script>
</body>
</html>
